//
// Created by wze-zero on 2024/9/17 017.
//
#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    int n;
    cin >> n;
    int num[n][n];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < n; ++j) {
            num[i][j] = 0;
            if (j == 0 || i == j) {
                num[i][j] = 1;
            } else if (i > j) {
                num[i][j] = num[i - 1][j] + num[i - 1][j - 1];
            }
        }
    }
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < n; ++j) {
            if (num[i][j] != 0) {
                cout << fixed << setw(5) << num[i][j];
            }
        }
        cout << endl;
    }
    return 0;
}